const CAR_LIST = [
	{
		name: '无要求',
		value: 0,
	},
	{
		name: '有车',
		value: 1,
	}
]


export const getCarStatusList = () => {
  const carList = [...CAR_LIST];
  return carList
}

export const getCarStatusByIndex = ({ index } = {}) => {
	if (!Number.isInteger(index)) {
		return {
			name: "",
			value: null
		}
	}

  const carList = getCarStatusList();

	const value = carList[index];
	return value
}

export const getCarStatusByValue = ({ value } = {}) => {
	return getCarStatusList().find(item => item.value === value) || {}
}